<?php
/**
 * m_taxonomy
 * 
 * @package CMS Project
 * @author Smith
 * @copyright 2012
 * @version 1
 * @access public
 */
class m_taxonomy extends CI_Model
{
    public function __construct()
    {
        parent::__construct();
    }
    
    public function create($arrayData,$value_vocabulary)
    {
        $this->db->insert('taxonomy',$arrayData);
        $fields = array(
                            'id'.$value_vocabulary => array(
                                                     'type' => 'INT',
                                                     'constraint' => 5,
                                                     'unsigned' => TRUE,
                                                     'auto_increment' => TRUE
                                              )
                        );
        
        $this->dbforge->add_field($fields);
        
        $this->dbforge->add_key('id'.$value_vocabulary, TRUE);
        // gives PRIMARY KEY (blog_id)
        
        $this->dbforge->create_table($value_vocabulary); 
//        $this->dbforge->add_column($value_vocabulary,$field);

    }
    public function getAll()
    {
        $query = $this->db->get('taxonomy');
        return $query->result_array();
    }
    public function read()
    {
        
    } 
    
    public function update()
    {
        
    } 
    
    public function delete()
    {
        
    }      
}
?>